package com.forfunnet.minjian.ui;

import android.support.v4.view.ViewPager;

import com.forfunnet.minjian.R;
import com.forfunnet.minjian.ui.adapter.GuidePagerAdapter;
import com.viewpagerindicator.IconPageIndicator;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by RexQian on 4/3/16.
 */
@EActivity(R.layout.activity_guide)
public class GuideActivity extends BaseActivity {
    @ViewById(R.id.view_pager)
    ViewPager mViewPager;
    @ViewById(R.id.indicator)
    IconPageIndicator mIndicator;
    @AfterViews
    void init() {
        List<Integer> imageList = new ArrayList<Integer>();
        imageList.add(R.drawable.guide1);
        imageList.add(R.drawable.guide2);
        imageList.add(R.drawable.guide3);

        GuidePagerAdapter pagerAdapter = new GuidePagerAdapter(this, imageList);
        mViewPager.setAdapter(pagerAdapter);
        mIndicator.setViewPager(mViewPager);
    }
}
